
/*
import scala.actors.Future
import scala.actors.Futures._

object App {
  def main(args: Array[String]) = {

    var results = List[Future[Int]]()
    for (i <- 1 to 10) {
      println("Sending " + i + "...")
      val f = future {
        println("Processing " + i + "...")
        Thread.sleep(500)
        println("Processed " + i)
        i
      }
      println("Sent " + i)
      results = results ::: List(f)
    }

    results.foreach(future =>
      println("result: " + future()))
  }
}
*/
/*import scala.concurrent._
import java.util.concurrent.Executors

object App {
  
	implicit val ec = new ExecutionContext {
	    val threadPool = Executors.newFixedThreadPool(1000);
	
	    def execute(runnable: Runnable) {
	        threadPool.submit(runnable)
	    }
	
	    def reportFailure(t: Throwable) {}
	}
  
  def main(args: Array[String]) = {

    var results = List[Future[Int]]()
    for (i <- 1 to 10) {
      println("Sending " + i + "...")
      val f = future {
        println("Processing " + i + "...")
        Thread.sleep(5000)
        println("Processed " + i)
        i
      }
      println("Sent " + i)
      results = results ::: List(f)
    }

    results.foreach(future =>
      println("result: " + future))
  }
}
*/
